/* eslint-disable import/no-mutable-exports */
///
/// MARK: camelCase
///

import { camelCase as ccCamelCase } from "change-case";
// import { camelCase as etCamelCase } from "es-toolkit";

/**
 * #__NO_SIDE_EFFECTS__
 * #__INLINE__
 * @type {(input: string) => string}
 */
// eslint-disable-next-line no-var
export var camelCase =
  import.meta.env.NODE_ENV === "development" ? ccCamelCase : camelCaseLite;

/**
 * #__NO_SIDE_EFFECTS__
 * #__INLINE__
 * @param {string} str
 * @returns {string}
 */
function camelCaseLite(str) {
  return str.replaceAll(/-(\w)/g, (_, c) => c.toUpperCase());
}
